<?php

/* @var $this \yii\web\View */
/* @var $content string */

use backend\assets\AdminAsset;
use yii\helpers\Html;
use backend\components\Menu;
use yii\helpers\Url;
AdminAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	<title>济南报业 党建平台</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<meta name="renderer" content="webkit"/>
	<!-- basic styles -->
	<?php $this->head() ?>
	<?php $this->registerJsFile("@web/js/jquery-2.1.4.js",['position' =>\yii\web\View::POS_HEAD]);?>
</head>


<body>
	<?php $this->beginBody() ?>


	<div class="wrapper">

		<div class="sidebar" data-background-color="white" data-active-color="danger">

			<div class="sidebar-wrapper" >

				<div class="logo">
					<a href="#" class="simple-text" style="text-shadow: 2px 2px #ff5454;">
						<img src="/backend/img/logo.png" alt="" >
					</a>
				</div>

				<?php
				if(isset(Yii::$app->session['adminuser']))
				{
					$menus=Yii::$app->session['adminuser']->role->getMenusArray();

					echo Menu::widget([
						'options' => [
						'class' => 'nav nav-list ',
						'id' => 'side-menu'
						],
						'items' =>  $menus,
						]);
				}

				?>

				<!-- /.nav-list -->

				<div class="sidebar-collapse" id="sidebar-collapse">
					<i class="icon-double-angle-left" data-icon1="icon-double-angle-left" data-icon2="icon-double-angle-right"></i>
				</div>
			</div>

		</div>


		<div class="main-panel">


			<nav class="navbar navbar-default">
				<div class="container-fluid">
					<div class="navbar-header">
						<button type="button" class="navbar-toggle">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar bar1"></span>
							<span class="icon-bar bar2"></span>
							<span class="icon-bar bar3"></span>
						</button>
						<a class="navbar-brand" href="#"><?= $this->title ?></a>
					</div>
					<div class="collapse navbar-collapse">

 						<ul class="nav navbar-nav navbar-left">
							<li>
								<a href="<?=Url::toRoute(['/landing/']);?>">
									<i class="ti-settings"></i>
									<p>返回主页</p>
								</a>
							</li>
							<li>
								<a href="<?=Url::toRoute(['/admin/branch/architecture']);?>">
									<i class="ti-settings"></i>
									<p>组织架构</p>
								</a>
							</li>
							<li>
								<a href="<?=Url::toRoute(['/admin/role/updaterole?roleid=1']);?>">
									<i class="ti-settings"></i>
									<p>设置</p>
								</a>
							</li>

						</ul>

						<ul class="nav navbar-nav navbar-right">
							<li>
								<a href="javascript:;">
									<i class="ti-user"></i>
									<p>当前用户&nbsp;
									<?//=Yii::$app->session['adminuser']->realname ?></p>
								</a>
							</li>
							<li class="dropdown">
							    <a href="<?=Url::toRoute(['/admin/notice/index']);?>">
									<i class="ti-bell"></i>
									<p>通知</p>
								</a>
							</li>
							<li>
								<a href="<?=Url::toRoute(['/admin/login/logout']);?>" >
									<i class="ti-panel"></i>
									<p>退出</p>
								</a>
							</li>
						</ul>

					</div>
				</div>
			</nav>
			


			<div class="content">

				<div class="container-fluid">

					<div class="breadcrumbs" id="breadcrumbs" style="display: none">
						<ul class="breadcrumb">
							<li>
								<i class="icon-home home-icon"></i>
								<a href="<?=Url::toRoute(['index']); ?>">返回列表页</a>
							</li>
						</ul>
					</div>

					<?= $content ?>
					<div style="clear:both;"></div>
				</div><!-- /.container-fluid -->

			</div><!-- /.content -->

		</div><!-- /.main-panel -->

	</div><!-- wrapper -->

	<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>